#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<vector>
using namespace std;

template<class T,size_t sz>
class circlequeue
{
public:
	circlequeue()
	{
		_v.resize(sz);
	}
	bool Push(const T& tmp)
	{
		if (count < sz)
		{
			_v[end] = tmp;
			(++end)%=sz;
			count++;
			return true;

		}
		else
			return false;
	}
	size_t Push(const vector<char>& vs)
	{
		int index = 0;
		int cnt = count;
		while (count < sz)
		{
			_v[begin] = vs[index++];
			(++begin) %= sz;
			count++;
		}
		return count - cnt;
		
	}
	size_t Pop(size_t len)
	{
		while (count > 0 && len > 0)
		{
			begin++;
			begin %= sz;
			count--;
			len--;
		}
	}
private:
	vector<T> _v;
	int count = 0;
	int begin = 0;
	int end = 0;
};
int main()
{
	//circlequeue<int, 5> cir;
	//int a;
	//cir.Pop(a);
	//cir.Push(1);
	//cir.Push(1);
	//cir.Push(1);
	//cir.Push(1);
	//cir.Push(1);
	//bool ret = cir.Push(1);
	//if (ret) cout << '-' << endl;
	//cout << cir.Pop(a) << endl;
	//ret = cir.Push(100);
	//if (ret)
	//{
	//	cout << "sucess" << endl;
	//}

	circlequeue<char, 5> cir;

	return 0;
}


namespace cr
{
	template<class T>
	class unique
	{
	public:
		unique(const T* p =nullptr)
			:ptr(p)
		{}
		unique(const unique& uni) = delete;
		unique operator= (const unique& uni) = delete;
		unique(unique&& uni)
		{
			ptr = uni.ptr;
			uni.ptr = nullptr;
		}
		unique operator= (unique&& uni)
		{
			ptr = uni.ptr;
			uni.ptr = nullptr;
		}
		~unique()
		{
			del;//
		}
	private:
		T* ptr
	};
}

